﻿@model IEnumerable<dynamic>
@{
    Bundle("lightbox");
}

<ul class="attachments">
@if(Model.Any())
{
    var downloads = Model.Where(x => !MimeTypeHelper.IsImage(JDM.String(x.MimeType)));
    if(downloads.Any())
    {
        <li>
        @{
            Html.RenderPartial("_Downloads", downloads);
        }
        </li>
    }
    var images = Model.Where(x => MimeTypeHelper.IsImage(JDM.String(x.MimeType)));
    if(images.Any())
    {
        <li>
        @{
            Html.RenderPartial("_Images", images);
        }
        </li>
    }
}
else
{
    <li class="empty"><span>@T(Res.In("Common").Of("Expr").Name("NoData"))</span></li>
}
</ul>